package com.example.mytayunapi.Entity;

import lombok.Data;
import org.springframework.http.HttpStatus;

//
@Data
public class userInfo {
    private String name;
    private String School_degree;
    private String phone;
    private String password;
    private String Nick_name;
    private String aureole;
    private Boolean Login_1;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

//    public String getSchooldegree() {
//        return School_degree;
//    }

    public void setSchool_degree(String school_degree) {
        School_degree = school_degree;
    }

    public String getSubjectForToken() {
        // 由于 School_degree 是纯数字，直接使用它作为 JWT 的主题
        return School_degree;
    }

//    public void setSchool_degree(String school_degree) {
//        // 在设置School_degree时进行清理，确保不包含Base64 URL编码中非法的字符
//        // 替换 '+' 为 '-' 和 '/' 为 '_' 并移除 '='
//        String cleanedSchoolDegree = school_degree.replace("+", "-").replace("/", "_").replace("=", "");
//        this.School_degree = cleanedSchoolDegree;
//    }


    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNick_name() {
        return Nick_name;
    }

    public void setNick_name(String nick_name) {
        Nick_name = nick_name;
    }

    public String getAureole() {
        return aureole;
    }

    public void setAureole(String aureole) {
        this.aureole = aureole;
    }

    public Boolean getLogin_1() {
        return Login_1;
    }

    public void setLogin_1(Boolean login_1) {
        Login_1 = login_1;
    }

    @Override
    public String toString() {
        return "userInfo{" +
                "name='" + name + '\'' +
                ", School_degree='" + School_degree + '\'' +
                ", phone=" + phone +
                ", password='" + password + '\'' +
                ", Nick_name='" + Nick_name + '\'' +
                ", aureole='" + aureole + '\'' +
                ", Login_1=" + Login_1 +
                '}';
    }
}
